

#ifndef SCENEVIEW_H
#define SCENEVIEW_H

#include <qgl.h>
#include <iwindow.h>
#include <gfx/camera.h>
#include <gfx/projector.h>

class ceEngine;
class ceRenderLoop;
class ceScene;
class cceSceneView : public QGLWidget,
                      public iWindow
{
  Q_OBJECT
  CE_OBJECT;

private:
  ceRenderLoop    *_renderLoop;
  ceScene         *_scene;
  ceEngine        *_engine;
  ceCamera        _camera;
  ceProjector     _projector;


  ceEngine* GetEngine ();
protected:

  void initializeGL();
  void paintGL();

public:
  cceSceneView(QWidget* parent);

  void CreateScene ();
  void SetScene (ceScene* scene);
  ceScene* GetScene ();


public:
  virtual bool IsFullscreen () const { return false; }
  virtual ceWindowHandle GetWindowHandle () { return winId(); }

  virtual int GetX () const { return 0; }
  virtual int GetY () const { return 0; }

  virtual unsigned GetWidth () const { return width(); }
  virtual unsigned GetHeight () const { return height(); }

};

#endif // SCENEVIEW_H
